@import '@/assets/style/reset.scss';
@import './variables.scss';
@import './tools.scss';
@import './scroll.scss';
@import './animate.scss';
@import './icons.scss';
@import './common.scss';

html {
    text-rendering: optimizeLegibility;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

body {
    background-color: var(--body-bg);
    color: var(--body-color);
    font-size: 1em;
    line-height: 1.5;
    font-family: UbuntuMono, 'Varela Round', 'PingFang SC',
        'Microsoft YaHei', Helvetica, Arial, Menlo, Monaco,
        monospace, sans-serif;
}

#home {
    display: grid;
    grid-template-columns: 16vw 1fr 1fr 16vw;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-areas:
        'left main main right'
        'left main main right'
        'left main main right';

    height: 100vh;
    width: 100%;
}

#header {
    display: none !important;
}

#main {
    grid-area: main;
    display: grid;
    grid-template-rows: 60px 1fr 30px;
    grid-template-columns: 1fr;
    margin-top: 8px;
}

#mainContent {
    position: relative;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 40vh 1fr;
    padding: 20px;
    background-color: var(--mainContent-bg);
    overflow: auto;
}

.dayTitle {
    display: none;
}

.postTitl2,
.entrylistPosttitle,
.postTitle {
    font-weight: 600;
    padding-bottom: 0.5rem;
    &::before {
        content: '\f15c';
        font-weight: normal;
    }
}

.postTitl2,
.entrylistPosttitle {
    width: 100%;
}

.entrylistPostSummary,
.postCon {
    color: var(--postDesc-color);
    font-size: 14px;
}

.postDesc2,
.entrylistItemPostDesc,
.postDesc {
    padding-top: 0.5rem;
}

.entrylistItem {
    padding: 20px;
}

#sideBar,
#left-side {
    overflow: auto;
}

// rightside start

#sideBar {
    grid-area: right;
    margin: 8px 8px 0 0;
    background-color: var(--sidebar-bg);
    border-radius: 0 4px 0 0;
}

#sidebar_news,
#sidebar_search {
    display: none;
}

.sidebar-block {
    padding: 25px;
    border-bottom: 1px solid
        var(--sidebarBlock-border-color);
    h3 {
        font-family: 'DM Sans', sans-serif;
        color: var(--sidebarTitle-color);
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 20px;
    }
    ul {
        padding-top: 0.5rem;
        li {
            padding: 0.2rem 0.5rem;
            font-size: 12px;
            cursor: pointer;
            &:hover {
                transition: all 0.2s;
                color: var(--sidebarItem-hover-color);
            }
        }
    }
}

#sidebar_shortcut,
#sidebar_toptags {
    ul {
        display: flex;
        flex-wrap: wrap;
        li {
            margin-bottom: 0.5rem;
            margin-right: 0.5rem;
            padding: 0.2rem 0.4rem;
            background-color: var(--tags-bg);
            font-size: 12px;
        }
    }
}

.recent_comment_body {
    background-color: var(--tags-bg);
    border-radius: 4px;
}

#sidebar_recentposts ul li,
.recent_comment_title {
    @include text-over();
}

#sidebar_recentcomments {
    .recent_comment_body {
        padding: 1rem;
        &:hover {
            color: inherit;
        }
    }
}

#blog-calendar {
    #blogCalendar {
        table,
        tbody,
        tr,
        td {
            display: block;
        }
        tr {
            &:nth-child(1) {
                display: flex;
                flex-direction: row;
                justify-content: space-between;

                & > td:first-of-type {
                    width: 100%;

                    td {
                        width: auto;
                    }
                }

                // .CalNextPrev {
                //     a:hover {
                //         color: #fff;
                //    }
                // }
            }

            &:nth-child(2) {
                padding: 0 3.24px;
                margin-bottom: 5px;
                border-bottom: 1px solid #24273b;
            }

            &:not(:nth-child(1)) {
                display: flex;
                justify-content: space-between;

                td {
                    @include center(all);
                    width: 25px;
                    height: 25px;
                }
            }

            th,
            td {
                padding: 0.2rem;
            }
        }

        u {
            color: #00a1d6;
        }

        .CalTodayDay {
            background-color: #24273b;
            color: var(--themeColor);
            border-radius: 2px;
            font-size: 0.7em;
        }
    }
}

// rightside end

// leftside start
#left-side {
    grid-area: left;
    margin: 8px 0 0 8px;
    border-right: 1px solid var(--sidebarBlock-border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg);
    flex-shrink: 0;
    border-radius: 4px 0 0 0;
}

// leftside end

#footer {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--footer-bg);
    color: var(--footer-color);
    font-size: 14px;
    #poweredby {
        margin-left: 1rem;
    }
}

#post_detail {
    margin-top: 20px;
    animation: content-in 0.5s ease-in 0s;
    border-radius: 4px;
    // color: #fff;

    #topics .postDesc {
        padding: 0;
        color: var(--postDesc-color);
        text-align: center;
    }
}

#post_detail,
#blog-comments-placeholder,
#comment_form {
    padding: 1.5rem 1.5rem 0;
    background-color: var(--form-bg);
    overflow: hidden;
}

#comment_form {
    padding-bottom: 1.5rem;
}

// 分页器start
.topicListFooter {
    grid-column-start: 1;
    grid-column-end: 4;
}

#homepage_top_pager {
    display: none;
}

#homepage_bottom_pager {
    .pager {
        margin: 0;
    }
}

.pager,
#nav_next_page {
    padding: 0.5rem 0;
    border-radius: 4px;
    user-select: none;
    a {
        color: var(--themeColor);
    }
}

#nav_next_page {
    margin: 0 0 1rem;
    background-color: var(--pager-bg);
    font-weight: 700;
    text-align: center;
    &:hover {
        transition: all 0.3s;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
            0 10px 10px rgba(0, 0, 0, 0.22);
    }
}

.pager {
    display: flex;
    justify-content: center;
    grid-column-start: 1;
    grid-column-end: 5;
    text-align: center;
    margin: 0 0 16px;
    font-size: 14px;
    background-color: var(--pager-bg);
    a {
        margin: 0 16px;
        padding: 0 16px;
        border-radius: 4px;
        background-color: var(--pagerBtn-bg);
        border: none;
        white-space: nowrap;
        &:hover {
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
                0 10px 10px rgba(0, 0, 0, 0.22);
        }
    }
}
// 分页器end
#post_detail {
    .postTitle {
        padding-left: 0;
        padding-bottom: 1rem;
        font-size: 1.2rem;
    }
}

.forFlow {
    z-index: 2;
}

// 当前标签页,随笔分类
#taglist_title,
.custom-gallery h3,
.entrylistTitle,
.PostListTitle {
    padding: 1rem 1rem;
    border-bottom: 1px solid
        var(--listItemTitle-border-color);
    font-weight: 700;
    background-color: var(--listItemTitle-bg);
}

.entrylistDescription,
.postSeparator {
    display: none;
}

.entrylistTitle {
    grid-column-start: 1;
    grid-column-end: 4;
}

#myposts {
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 1rem;

    .PostList {
        padding: 0.5rem;
        margin: 0;
        background-color: var(--listItem-bg);
        border-radius: 4px;

        .postTitl2 {
            font-size: 1rem;
            font-weight: normal;
        }

        .postDesc2 {
            margin-bottom: 0;
            padding-top: 0;
            color: var(--postDesc-color);
        }

        .postText2 {
            display: none;
        }
        &:hover {
            transition: all 0.3s
                cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
                0 10px 10px rgba(0, 0, 0, 0.22);
        }
    }
}

#taglist_main {
    margin-top: 0;

    #taglist_title_wrap {
        padding: 0 !important;
    }

    #taglist {
        table,
        tbody,
        tr,
        td {
            display: block;
        }

        tbody,
        tr {
            display: flex;
            flex-wrap: wrap;
        }

        td {
            margin: 0.5rem;
            border-radius: 4px;
            background-color: var(--tags-bg);
        }
    }
}

// 文章结尾按钮
#blog_post_info_block {
    @include center(h);
    flex-direction: column;
    margin: 0;

    #BlogPostCategory {
        margin-bottom: 5.4px;
        font-size: 16px;
        order: 1;
    }

    #EntryTag {
        margin-bottom: 5.4px;
        font-size: 16px;
        order: 2;
    }

    #blog_post_info {
        order: 3;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        align-items: baseline;
        margin: 21.6px 0 10.8px;

        #green_channel {
            @include center();
            flex-wrap: wrap;
            margin: 0;
            padding: 0;
            width: auto;
            border: none;

            a,
            span {
                background: none;
                font-size: 14px;
                border-radius: 4px;
                box-shadow: none;
                font-weight: 700;
                text-shadow: none;
            }

            a {
                &:nth-child(1),
                &:nth-child(2),
                &:nth-child(3) {
                    padding: 4px 10px;
                    &:hover {
                        filter: brightness(0.9);
                        transition: all 0.2s;
                    }
                }

                &:nth-child(1) {
                    background-color: #ff6b81;
                }

                &:nth-child(2) {
                    background-color: #0984e3;
                }

                &:nth-child(3) {
                    background-color: #ffa502;
                }
            }

            #green_channel_weibo,
            #green_channel_wechat {
                display: none;
                // background: none;

                // img {
                //     width: 24px;
                //     height: 24px;
                //     margin-left: 0;
                // }
            }

            // #green_channel_weibo {
            //     margin-left: 21.6px;
            // }

            // #green_channel_wechat {
            //     margin-right: 21.6px;
            // }
        }

        #author_profile {
            @include center();
            margin: 0 10.8px 0 0;
            padding: 0;
            width: auto;
            order: -1;

            #author_profile_info {
                display: none;
                // #author_profile_detail {
                // }
            }

            // #author_profile_honor {
            // }
            #author_profile_follow {
                display: none;
            }
        }

        #div_digg {
            @include center();
            margin: 0;
            padding: 0;

            .diggit,
            .buryit {
                width: auto;
                height: auto;
                margin-top: 0;
                padding: 4px 10px;
                background: none;
                border-radius: 4px;
                font-size: 14px;

                span {
                    color: #fff;
                }

                .diggnum,
                .burynum {
                    line-height: 1em !important;
                }
            }

            .diggit,
            .buryit {
                &:hover {
                    filter: brightness(0.9);
                    transition: all 0.2s;
                }
            }

            .diggit {
                background-color: #ff6b81;
                &::before {
                    content: '\f004';
                    color: #fff;
                    margin-right: 0;
                }
            }

            .buryit {
                margin-left: 10.8px;
                background-color: #ced6e0;
                &::before {
                    content: '\f004';
                    color: #fff;
                    margin-right: 0;
                }
            }

            .diggword {
                display: none;
            }
        }
    }

    #post_next_prev {
        display: none;
        order: 3;
        margin-top: 21.6px;
        font-size: 16px;
        color: #999;

        a:nth-child(3n + 1) {
            display: none;
        }
    }
}

#blog-comments-placeholder br,
#comment_pager_top {
    display: none;
}

// 评论列表
#blog-comments-placeholder {
    border-radius: 4px;

    .feedback_area_title {
        padding: 7.56px 10.8px;
        border: 1px solid var(--form-border-color);
        background-color: var(--formTitle-bg);
        border-radius: 2px 2px 0 0;
        font-size: 12px;
        font-weight: 700;

        &::before {
            content: '\f4ad';
        }
    }

    .feedbackItem {
        border-left: 1px solid var(--form-border-color);
        border-right: 1px solid var(--form-border-color);
        padding: 17.982px 10.8px;
        &:nth-last-child(2) {
            border-bottom: 1px solid
                var(--form-border-color);
        }
    }

    .custom-comments-author {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        position: relative;
        .louzhu {
            display: none;
        }

        .blog_comment_body {
            background-color: var(
                --commonBody-bg
            ) !important;
            color: var(--commonBody-color);
            margin-right: 10px;
            margin-left: 0;
            // @
            a:nth-child(1) {
                // color: #ffd257;
                // font-weight: 700;
                // font-size: 1.2rem;
                border-bottom: none;
            }

            // a:not(:nth-child(1)):hover {
            //     color: #3273dc;
            //     transition: all 0.25s;
            // }
        }

        // img {
        //     margin-left: 10.8px;
        // }

        .blog_comment_body::before {
            display: none;
        }

        .blog_comment_body::after {
            content: '';
            display: block;
            position: absolute;
            right: -24.84px;
            top: 5.4px;
            width: 6.258px;
            height: 0;
            border-left: solid 12.96px var(--commonBody-bg);
            border-top: solid 3.24px rgba(0, 0, 0, 0);
            border-bottom: solid 7.182px rgba(0, 0, 0, 0);
        }

        .feedbackManage {
            order: 0;
        }

        .layer {
            margin-left: 5.4px;
            order: 3 !important;
        }

        .comment_vote {
            order: -3;
        }

        .comment_date {
            order: -1 !important;
        }

        .feedbackManage {
            order: -2 !important;
        }

        .feedbackCon {
            flex-direction: row-reverse;
            max-width: 100%;
            // .blog_comment_body {
            //     // max-width: 60%;

            //     // img {
            //     //     width: 27px;
            //     //     height: 27px;
            //     //     vertical-align: middle;
            //     // }
            // }

            br {
                display: none;
            }
        }
    }

    br {
        display: none;
    }

    .layer {
        padding: 0 5.4px;
        background-color: var(--layer-bg);
        color: var(--layer-color);
        font-weight: 700;
        border-radius: 4px;
        margin-right: 5.4px;
        order: 0;
        font-size: 12px;
    }

    .comment_date {
        margin: 0 5.4px;
        order: 2;
        font-size: 14px;
    }
}

.feedbackListSubtitle {
    @include center();
    flex-wrap: wrap;
    margin-bottom: 5px;
    font-size: 0;
    color: var(--sidebarTitle-color);
    & > a:last-of-type {
        margin-left: 8px;
        color: #00a1d6;
        order: 1;
        font-size: 14px;
    }

    .feedbackManage {
        order: 3;
        font-size: 14px;
        .comment_actions {
            border-bottom: 1px solid #3273dc;
        }
    }

    .comment_vote {
        order: 4;
        font-size: 14px;
        a {
            padding-left: 8px;
        }
    }
}

.feedbackCon {
    @include center();
    margin-top: 5px;
    align-items: flex-start;
    .blog_comment_body {
        position: relative;
        margin: 16px 0 0 10px;
        max-width: 80%;
        border-radius: 4px;
        color: var(--commonBody-color);
        font-size: 14px;
        line-height: 1.6;
        padding: 5.4px 10.8px;
        background-color: var(--commonBody-bg);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        &:before {
            content: '';
            display: block;
            position: absolute;
            left: -24.84px;
            top: 5.4px;
            width: 12.258px;
            height: 0;
            border-right: solid 12.96px var(--commonBody-bg);
            border-top: solid 3.24px rgba(0, 0, 0, 0);
            border-bottom: solid 7.182px rgba(0, 0, 0, 0);
        }
    }

    .avatar {
        border-radius: 50%;
        transform: scale(0.8);
    }
}

// 发表评论
#comment_form {
    #divCommentShow,
    #ad_text_under_commentbox,
    #comment_nav {
        display: none;
    }

    #comment_form_container {
        position: relative;
        border: 1px solid var(--form-border-color);
        border-radius: 4px;

        & > p:nth-of-type(3),
        & > a:first-of-type {
            display: none;
        }

        & > p:last-of-type {
            color: var(--formDesc-color);
            margin-left: 10.8px;
            font-size: 14px;
        }

        #commentform_title {
            background: none;
            margin-bottom: 0;
            padding: 7.56px 10.8px;
            border-bottom: 1px solid
                var(--form-border-color);
            background-color: var(--formTitle-bg);
            border-radius: 2px 2px 0 0;
            font-size: 12px;
            font-weight: 700;

            &::before {
                content: '\f086';
            }
        }

        #tip_comment {
            display: none;
        }

        .comment_textarea {
            width: 100%;
            border-color: var(--text-9);
            background: none;
            border: none;

            .commentbox_title {
                border-bottom-color: var(
                    --form-border-color
                );
            }

            .commentbox_title_left {
                display: none;
            }

            // .commentbox_title_right {
            // }
            #tbCommentBody {
                margin-bottom: 10.8px !important;
                height: 81px;
                min-height: 170px;
                background: none;
                font-size: 16px;
                border-bottom: 1px dashed
                    var(--form-border-color);
                color: #999;
            }

            // #tbCommentBodyPreview {
            // }
            // #commentbox_footer {
            // }
        }

        #commentbox_opt {
            & > a {
                display: none;
            }

            #btn_comment_submit {
                position: absolute;
                bottom: 10.8px;
                right: 10.8px;
                width: 75.6px;
                height: 32.4px;
                border-radius: 4px;
                border: none;
                background-color: var(--themeColor);
                user-select: none;
                outline: none;
                cursor: pointer;
                font-size: 12px;
                color: #fff;

                &:hover {
                    transition: all 0.2s;
                    filter: brightness(0.8);
                }
            }
        }

        #tip_comment2 {
            display: none;
        }
    }
}

#ad_t2 {
    margin: 21.6px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: var(--ad-color);
    border-radius: 4px;

    br {
        display: none;
    }

    a {
        border-radius: 4px;
        margin-right: 0;
        user-select: none;
        @include text-over();
        background-color: var(--ad-bg);

        &:not(:nth-child(1)) {
            margin-top: 5px;
        }
    }
}

#commentform_title a,
#bannerbar,
#under_post_kb,
#under_post_news,
#cnblogs_c1,
#cnblogs_c2 {
    display: none;
}

/* 历史上的今天 */
#HistoryToday {
    display: none;
}

// 评论输入框下方导航栏
.under-comment-nav,
.under-comment-box-nav {
    display: none;
}

@import './markdown.scss';
@import './index.m.scss';
